﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wydatki.WRK.Praca
{
    public class SumRow
    {
        public string Typ
        {
            get;
            set;
        }
        public decimal Suma
        {
            get;
            set;
        }
    }

    public class SumRowCollection : List<SumRow>
    {
        public SumRow this[string type]
        {
            get
            {
                foreach (SumRow r in this)
                {
                    if (r.Typ == type)
                        return r;
                }
                return null;
            }
        }
        public void ClearSum()
        {
            foreach (SumRow r in this)
                r.Suma = 0;
        }
    }
}
